<template>
  <div class="app-container">
    <div class="filter-container">{{shopInfo.shopName}}</div>
    <el-tabs v-model="activeName" type="border-card" @tab-click="handleClick">
      <el-tab-pane name="basic" v-if="btnPower.ShopCheckBase">
        <span slot="label"><i class="el-icon-date"></i> 基本信息</span>
        <el-form :model="basicForm" label-width="100px" class="demo-ruleForm">
          <el-form-item label="营业执照名称">
            <el-input v-model="basicForm.licenseName" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="营业执照号">
            <el-input v-model="basicForm.license" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="营业执照有效期开始">
            <el-input v-model="basicForm.licenseCardBgn" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="营业执照有效期结束">
            <el-input v-model="basicForm.licenseCardEnd" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="线下门店名称">
            <el-input v-model="basicForm.merchantName" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="商户简称">
            <el-input v-model="basicForm.merchantShortName" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="法人姓名">
            <el-input v-model="basicForm.lawyer" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="联系人姓名">
            <el-input v-model="basicForm.linkName" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="联系人手机号">
            <el-input v-model="basicForm.phone" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="联系人邮箱">
            <el-input v-model="basicForm.email" disabled style="width: 380px;" />
          </el-form-item>
        </el-form>
      </el-tab-pane>

      <el-tab-pane name="accounts" label="结算信息" v-if="btnPower.ShopCheckAccounts">
        <el-form :model="basicForm" label-width="100px" class="demo-ruleForm">
          <el-form-item label="商户费率">
            <el-input v-model="basicForm.transRuleType" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="结算账户名称">
            <el-input v-model="basicForm.accountName" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="结算账户号">
            <el-input v-model="basicForm.accountNo" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="开户银行">
            <el-input v-model="basicForm.bankName" disabled style="width: 380px;" />
          </el-form-item>
          <el-form-item label="开户支行">
            <el-input v-model="basicForm.subBranchName" disabled style="width: 380px;" />
          </el-form-item>
        </el-form>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import { selectShopBasic } from '@/api/api.verify.js'

export default {
  name: 'ShopCheck',
  data() {
    return {
      btnPower:JSON.parse(localStorage.getItem('btnList')),//按钮权限
      listLoading: true,
      activeName:'basic',
      shopInfo:{},//信息
      merchantNo:{},//店铺信息
      basicForm:{},//基本信息,结算信息
    }
  },
  created() {
    this.getStart()
  },
  methods: {
    getStart(){//初始化sdf
      this.shopInfo=this.$route.query
      this.getSelectShopBasic()
    },

    getSelectShopBasic(){//基本信息查询
      let _this=this
      let data={}
      data.merchantNo=this.shopInfo.shopNo
      selectShopBasic(data).then(d=>{
        if(d.data){
          _this.basicForm=d.data
        }
      })
    },

    handleClick(tab){//点击tabs触发
      switch(tab.name){
        case "basic"://基本信息
          this.getSelectShopBasic()
          break;
        case "accounts"://结算信息
          break;
      }
    },
  }
}
</script>

